$(function() {
  let arr = location.search.split('productId=');
  productid = arr[1].split('&categoryId')[0];
  // console.log(productid);
  $.ajax({
    url: 'http://localhost:3000/api/getproductcom',
    data: { productid },
    success(res) {
      console.log(res);
      $('.comment ul').html(template('tmp', res));
    }
  });
});
